solution by logarithms

对数解法